import {createStore,compose,applyMiddleware} from "redux"
import thunk from 'redux-thunk'
import reducer from './reducer'//总模块
import {routerMiddleware} from 'react-router-redux'

let createHistory =require('history').createBrowserHistory;
let history = createHistory();
let routerWare = routerMiddleware(history)

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducer,composeEnhancers(
                    applyMiddleware(thunk, routerWare)
                ))

export default store